*** Ambiguity on NDC Ambition ****
//importing the analysis file
cd "$path/New datasets"
use Dataset_Analysis.dta

*********  recoding variables ************** 
// type of target
gen type_target=type_of_target_class
recode type_target (0=.) (6=0) (4=1) (3=2) (5=3) (2=4) (1=5)

//cost 0 og 1 er 1, rest 0
recode costs_of_ccm_class (0=.) (2 3 4 5 6=0) (1=1)

//Focus sector  
recode renewable_energy_class (0=1) (2 3=0) (1=1)

recode energy_efficiency_class (0=1) (2 3=0) (1=1)

recode transport_class (0=1) (2 3=0) (1=1)

recode carbon_capture_and_storage_class (0=.) (2 3=0) (1=1)

recode agriculture_class (0=.) (2 3=0) (1=1)

recode land_use_and_forestry_class (0=.) (2 3=0) (1=1)

recode waste_class  (0=.) (2 3=0) (1=1)

//reducing_non_co2_gases_class
recode reducing_non_co2_gases_class (0=.) (2=0) (1=1)

//land_use_change_class
recode land_use_change_class (1=3) (2=2) (3 4 =1) (5=0)

//mitigation_document_class

recode mitigation_documents_class (0=.) (1=1) (2 3 4 =0)

//conditionality_of_mitigation_fin
recode conditionality_of_mitigation_fin (0=.) (1=0) (2=1) (3=2) (4=3)

//technology_needs_class
rename technology_needs_class tech_needs
recode tech_needs (0=.) (1=0) (3=1) (2=2), g(technology_needs_class)

//conditionality_of_technology_tra
rename conditionality_of_technology_tra cond_tech
recode cond_tech (0=.) (1=0) (2=1) (3=2), g(conditionality_of_technology_tra)

//conditionality_of_capacity_build
recode conditionality_of_capacity_build (0=.) (1=0) (2=1) (3=2)

//planning_of_ndc_formulation_clas 
recode planning_of_indc_formulation_cla (0=.) (2 3 =0) (1=1)

//stakeholder_consultation_class
recode stakeholder_consultation_class (0=.) (2 3=0) (1=1)

//planning_of_ndc_implementation_class
recode planning_of_indc_implementation_ (0=.) (3=0) (2=1) (1=2)

//monitoring_and_review
recode monitoring_and_review_class (0=.) (2 3 4 =0) (1=1)

//standardizing the variables
egen costs_of_ccm_class_z=std(costs_of_ccm_class)
egen type_target_z=std(type_target)
egen renewable_energy_class_z=std(renewable_energy_class)
egen energy_efficiency_class_z=std(energy_efficiency_class)
egen transport_class_z=std(transport_class)
egen carbon_capture_and_storage_z=std(carbon_capture_and_storage_class)
egen agriculture_class_z=std(agriculture_class)
egen land_use_and_forestry_class_z=std(land_use_and_forestry_class)
egen waste_class_z=std(waste_class)
egen reducing_non_co2_gases_class_z=std(reducing_non_co2_gases_class)
egen land_use_change_class_z=std(land_use_change_class)
egen mitigation_documents_class_z=std(mitigation_documents_class)
egen conditionality_of_fin_z=std(conditionality_of_mitigation_fin)
egen technology_needs_class_z=std(technology_needs_class)
egen conditionality_of_tra_z=std(conditionality_of_technology_tra)
egen conditionality_of_build_z=std(conditionality_of_capacity_build)
egen planning_of_ndc_clas_z=std(planning_of_indc_formulation_cla)
egen stakeholder_consultation_class_z=std(stakeholder_consultation_class)
egen planning_of_ndc_implementation_z=std(planning_of_indc_implementation_)
egen monitoring_and_review_class_z=std(monitoring_and_review_class)


//renaming democracy
rename Democracy_index v2x_mpi_2015

//destring controls
replace v2x_mpi_2015="." if v2x_mpi_2015=="NA"
replace vulnerability_2015="." if vulnerability_2015=="NA"
replace coal_rents_2015="." if coal_rents_2015=="NA"
replace oil_rents_2015="." if oil_rents_2015=="NA"
replace natural_gas_rents_2015="." if natural_gas_rents_2015=="NA"
replace GDP_ppp_2015_log="." if GDP_ppp_2015_log=="NA"

destring GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, replace


//turn around ambition Dupont_ambition_low
replace Dupont_ambition_low="." if Dupont_ambition_low=="NA"
destring Dupont_ambition_low, replace
replace Dupont_ambition_low=5.1-Dupont_ambition_low

**** Storing a dataset for use in sensitivity analyses ****
preserve 
local myvars costs_of_ccm_class type_target renewable_energy_class energy_efficiency_class transport_class carbon_capture_and_storage_class agriculture_class land_use_and_forestry_class waste_class reducing_non_co2_gases_class land_use_change_class mitigation_documents_class conditionality_of_mitigation_fin technology_needs_class conditionality_of_technology_tra conditionality_of_capacity_build planning_of_indc_formulation_cla stakeholder_consultation_class planning_of_indc_implementation_ monitoring_and_review_class GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015 Dupont_ambition_low 

keep `myvars'

// Use the local macro in the foreach loop to drop missing values
foreach var of local myvars {
    drop if missing(`var')
}

cd "$path/New datasets"
save Dataset_ready.dta, replace
restore

*** Equal weights standardized *****
gen index_z=costs_of_ccm_class_z+type_target_z+renewable_energy_class_z+ ///
energy_efficiency_class_z +transport_class_z+carbon_capture_and_storage_z+ ///
agriculture_class_z+land_use_and_forestry_class_z+waste_class_z+ ///
reducing_non_co2_gases_class_z+land_use_change_class_z+mitigation_documents_class_z+ ///
conditionality_of_fin_z+technology_needs_class_z+conditionality_of_tra_z+ ///
conditionality_of_build_z+planning_of_ndc_clas_z+stakeholder_consultation_class_z+ ///
planning_of_ndc_implementation_z+monitoring_and_review_class_z



*** Equal weights not standardized *****
gen index_2= costs_of_ccm_class+type_target+renewable_energy_class+energy_efficiency_class+transport_class+carbon_capture_and_storage_class+agriculture_class+land_use_and_forestry_class+waste_class+reducing_non_co2_gases_class+land_use_change_class+mitigation_documents_class+conditionality_of_mitigation_fin+technology_needs_class+conditionality_of_technology_tra+conditionality_of_capacity_build+planning_of_indc_formulation_cla+stakeholder_consultation_class+planning_of_indc_implementation_+monitoring_and_review_class


//regression analyses
local control "GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015"
reg Dupont_ambition_low index_2 `control',r

estimates store b


******** Weights proportional to the absolute coeficient in explaining: Type target  ********
//weights are computed in excel. Could also be done automatically in stata: see 2_Further_robustness, Line 241 to 278

reg type_target_z costs_of_ccm_class_z renewable_energy_class_z energy_efficiency_class_z ///
transport_class_z carbon_capture_and_storage_z agriculture_class_z  ///
land_use_and_forestry_class_z ///
mitigation_documents_class_z  reducing_non_co2_gases_class_z  ///
land_use_change_class_z   ///
conditionality_of_fin_z  technology_needs_class_z  ///
conditionality_of_tra_z  conditionality_of_build_z ///
planning_of_ndc_clas_z  stakeholder_consultation_class_z  ///
planning_of_ndc_implementation_z  monitoring_and_review_class_z ///
 waste_class_z if Dupont_ambition_low!=.,r

gen indexreg= costs_of_ccm_class_z*0.051483205+  renewable_energy_class_z*0.007236301 + ///
energy_efficiency_class_z*0.069460231 + transport_class_z*0.026856953 + ///
carbon_capture_and_storage_z*0.07989379+ ///
agriculture_class_z* 0.006743244 + land_use_and_forestry_class_z* 0.021792159+ ///
reducing_non_co2_gases_class_z*0.170601979 + land_use_change_class_z*0.010584933 + ///  
mitigation_documents_class_z* 0.05047176 +  conditionality_of_fin_z* 0.072185651 + /// 
technology_needs_class_z* 0.02697687 + conditionality_of_tra_z*0.167596781 + ///  
conditionality_of_build_z*0.007586778 + planning_of_ndc_clas_z*0.039242615 + /// 
stakeholder_consultation_class_z*0.082434281 + planning_of_ndc_implementation_z* 0.034791715 + ///  
monitoring_and_review_class_z*0.053514757 + waste_class_z*0.020545997


//regressions analyses
local control "GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015"
reg Dupont_ambition_low indexreg `control',r

estimates store c

************** Principal Components (or without the "_z" extension)
pca costs_of_ccm_class_z type_target_z renewable_energy_class_z energy_efficiency_class_z ///
transport_class_z carbon_capture_and_storage_z agriculture_class_z  ///
land_use_and_forestry_class_z   ///
mitigation_documents_class_z  reducing_non_co2_gases_class_z  ///
land_use_change_class_z    ///
conditionality_of_fin_z  technology_needs_class_z  ///
conditionality_of_tra_z  conditionality_of_build_z ///
planning_of_ndc_clas_z  stakeholder_consultation_class_z  ///
planning_of_ndc_implementation_z  monitoring_and_review_class_z ///
waste_class_z 

predict d1

matrix loadings = e(L)

// Convert matrix to dataset
matrix comp1=loadings[1...,1],loadings[1...,2]


**** Table D.2: Component loadings (unrotated) ****
cd "$path/Figures and Tables"

putexcel set "components.xlsx", replace
putexcel A1=matrix(comp1)

//Rotate to get a simpler structure
rotate, varimax

predict f1, score


***** Figure D.1: Scree plot of eigenvalues and variance after PCA *******
//Making the screeplot
mat eigenvalues = e(Ev)
gen eigenvalues = eigenvalues[1,_n]
egen pct=total(eigenvalues) if !mi(eigenvalues)
replace pct=sum((eigenvalues/pct)*100) if !mi(eigenvalues)
g component=_n if !mi(eigenvalues)
twoway line eigenvalues component, sort ytitle(Eigenvalues) ///
 ///
|| line pct component, sort yaxis(2) ytitle(Cumulative percent explained variance, axis(2)) ///
xlabel(1/20) xtitle(Number of components) legend(off) ///
title(Scree plot of eigenvalues after pca) graphregion(color(white))

cd "$path/Figures and Tables"

graph export FigureD1.png  //Storing figure D.1

//regression analysis
local control "GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015"
reg Dupont_ambition_low f1 `control',r

estimates store d


******* Table 1: OLS regression models of three commitment ambiguity indices and NDC ambition  ************** 
//running the regressions using double lasso
local control "c.GDP_ppp_2015_log##c.v2x_mpi_2015##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"


dsregress Dupont_ambition_low index_2, controls(`control') selection(cv) rseed(46503448) vce(robust)
eststo b1

dsregress Dupont_ambition_low indexreg, controls(`control') selection(cv) rseed(46503448) vce(robust)
eststo c1

dsregress Dupont_ambition_low f1, controls(`control') selection(cv) rseed(46503448) vce(robust)
eststo d1


esttab  b b1 c c1 d d1  using Table1.tex, noconstant r2 star( * 0.10 ** 0.05 *** 0.010) se  label  ///
title("OLS regression models of three commitment ambiguity indices and NDC ambition") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace



******  Table E.1: Correlates of NDC Ambiguity  *******************

reg index_2 GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015  coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, r
eststo T

reg indexreg GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015 , r
eststo V

reg f1 GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, r
eststo X


esttab  T V X  using TableE1.tex,  se r2 star( * 0.10 ** 0.05 *** 0.010) label  ///
title("Correlates of NDC Ambiguity") ///
 nodepvars nomtitles  ///
  addnotes  ///
(dsds) ///
gap eqlabels(none) collabels(,lhs(Dep Var: Ambiguity)) replace

********* Table 2: Interaction effect between commitment ambiguity and form of governance ************
// equal weights index
gen transamb=index_2*v2x_mpi_2015

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"
dsregress Dupont_ambition_low index_2  v2x_mpi_2015 transamb, /// 
controls(`control') selection(cv) rseed(46503448) vce(robust) 
eststo x

//regression weights
gen transamb1=indexreg*v2x_mpi_2015

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"
dsregress Dupont_ambition_low indexreg v2x_mpi_2015 transamb1, /// 
controls(`control') selection(cv) rseed(46503448) vce(robust)
eststo y

//PCA_analysis
gen transamb2=f1*v2x_mpi_2015

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"
dsregress Dupont_ambition_low f1 v2x_mpi_2015 transamb2, vce(robust) /// 
controls(`control') selection(cv) rseed(46503448)
eststo z 

esttab  x y z  using Table2.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Interaction effect between commitment ambiguity and form of governance") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace

//To see what variables are selected in each model, type "di e(controls_sel)" immediately after the command.


***** Figure 3: Interaction effect between commitment ambiguity and form of governance ***************
ssc install combomarginsplot

reg Dupont_ambition_low index_2 v2x_mpi_2015 c.index_2#c.v2x_mpi_2015 ///
GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 /// 
c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 ///
c.vulnerability_2015#c.coal_rents_2015#c.natural_gas_rents_2015 ///
natural_gas_rents_2015 vulnerability_2015, r

sum v2x_mpi_2015

global effa = r(mean) + r(sd)
global eff = r(mean)
global effb = r(mean) - r(sd)

margins, at(index_2=(5(2)22) v2x_mpi_2015=($effa )) saving(compl, replace)
margins, at(index_2=(5(2)22) v2x_mpi_2015=($eff )) saving(compl1, replace)
margins, at(index_2=(5(2)22) v2x_mpi_2015=($effb )) saving(compl2, replace)


combomarginsplot compl compl2, /// 
file1opts(color(navy%70)) ///
fileci1opts(recast(rarea) color(navy%20)) ///
file2opts(color(red%70)) ///
fileci2opts(recast(rarea) color(red%20)) graphregion(color(white)) ///
label(  "Mean + 1 SD"  "Mean - 1 SD") xtitle(Commitment ambiguity) ytitle(NDC Ambition) title("")

graph export Figure3.png

/* Calculating the level of democracy at which the countries would neither be prudent or imprudent 
//No weights
di 0.0252/0.209
// 0.121

count if v2x_mpi_2015>0.121
//147

count if v2x_mpi_2015<0.121
//49

//Regression weights
di 0.661/2.953
// 0.224

count if v2x_mpi_2015>0.224
//130

count if v2x_mpi_2015<0.224
//66

//Factor analysis
di 0.480/1.509
//0.318

count if v2x_mpi_2015>0.318
//116

count if v2x_mpi_2015<0.318
//80

//Average number of countries that are above and below
//above
di (147+130+116)/3
//131

di (49+66+80)/3
//65

di 131/(131+65)

di 65/(131+65)
*/

******* Table E.2: Correlation between missing values, ambiguity and ambition ***********
//Exploring whether there are systematic differences in ambiguity based on whether states are included in the regression analyses 
gen missing=1

replace missing=0 if Dupont_ambition_low!=. & GDP_ppp_2015_log!=. & v2x_mpi_2015!=. & vulnerability_2015!=. & coal_rents_2015!=. & oil_rents_2015!=. & natural_gas_rents_2015!=.

reg index_2 missing, r
eststo a11

reg indexreg missing, r
eststo b22

reg f1 missing, r
eststo c33

reg Dupont_ambition_low missing, r
eststo d44

esttab  a11 b22 c33 d44  using TableE2.tex, se r2 label star( * 0.10 ** 0.05 *** 0.010)  title("Correlation between missing values, ambiguity and ambition") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace



***** Table B1: Relationship between NDC updating and country characteristics ******* 
//Merging with data on whether countries have updated their NDCs
cd "$path/Additional data sources"
drop _merge
merge 1:1 iso3 using timeliness.dta
drop if _merge==2
drop _merge

rename NDC_timely_update timely_adj

//Making the regression table
ologit timely_adj v2x_mpi_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015 vulnerability_2015 GDP_ppp_2015_log,r  
eststo ab

cd "$path/Figures and Tables"
esttab  ab  using TableB1.tex, se r2 label star( * 0.10 ** 0.05 *** 0.010)  title("Relationship between NDC updating and country characteristics") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: Compliance concern)) replace

******************************************

***** Table C1: Interaction effect between commitment ambiguity and form of governance (without lasso-selection of controls) *****

//Only with control variables
regress Dupont_ambition_low index_2 v2x_mpi_2015 transamb GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, r
eststo x1

regress Dupont_ambition_low indexreg v2x_mpi_2015 transamb1 GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, r
eststo x2

regress Dupont_ambition_low f1 v2x_mpi_2015 transamb2 GDP_ppp_2015_log  vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015, r
eststo x3

esttab  x1 x2 x3 using TableC1.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Heterogenous effects with respect to transparency concerns") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace


****** Table C.2: Interaction effect between commitment ambiguity and form of governance with alternative ambiguity measures: 'Type of target and index with standardized index components' *********
// index - standardized components 
gen transamb3=index_z*v2x_mpi_2015

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"
dsregress Dupont_ambition_low index_z v2x_mpi_2015 transamb3, vce(robust) /// 
controls(`control') selection(cv) rseed(46503448)
eststo r 


// Type_target
gen transamb4=type_target*v2x_mpi_2015

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015"
dsregress Dupont_ambition_low type_target v2x_mpi_2015 transamb4, vce(robust) /// 
controls(`control') selection(cv) rseed(46503448)
eststo s


esttab  r s  using TableC2.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Interaction effect between commitment ambiguity and form of governance with alternative ambiguity measures: 'Type of target and index with standardized index components'") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace

/* CANNOT BE INCLUDED DUE TO DATA RESTRICTIONS!
***** Table C.7: Conditional effect of democracy on the Ambiguity-Ambition nexus with alternative dependent variable: CLAIM model *******
cd "...\Additional data sources"
merge 1:1 iso3 using ITR_Ambition_NOT_SHARE
drop if _merge==2
drop _merge

//reverse the scale
replace tNDC=4.47-tNDC

// equal weights index
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg tNDC index_2 v2x_mpi_2015 transamb `control', r
eststo x33

//regression weights
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg tNDC indexreg v2x_mpi_2015 transamb1 `control', r
eststo y33

//PCA_analysis
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg tNDC f1 v2x_mpi_2015 transamb2 `control', r
eststo z33 

//Making table
cd "C:\Users\py174\Dropbox\Climate negotiations experiment\nytt paper (NDC uncertainty)\paper\Data_to_be_uploaded\First NDC_analysis\Originale Filer\Figures and Tables"

esttab  x33 y33 z33  using TableC7.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Conditional effect of democracy on the Ambiguity-Ambition nexus with alternative dependent variable: CLAIM model") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace
*/


***** Table C.8: Conditional effect of democracy on the ambiguity-ambition nexus with alternative dependent variable: CCPI *****
replace CCPI="" if CCPI=="NA"
destring CCPI, replace

// equal weights index
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg CCPI_2019 index_2 v2x_mpi_2015 transamb `control', r
eststo x55

//regression weights
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg CCPI_2019 indexreg v2x_mpi_2015 transamb1 `control', r
eststo y55

//PCA_analysis
local control GDP_ppp_2015_log vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015
reg CCPI_2019 f1 v2x_mpi_2015 transamb2 `control', r
eststo z55 

//Making table
esttab  x55 y55 z55  using TableC8.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Conditional effect of democracy on the ambiguity-ambition nexus with alternative dependent variable: CCPI") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace


****** Table C.9: Correlation between increased ambition and increased information in the updated NDCs ******
replace NDC_updated_increased_informatio="0" if NDC_updated_increased_informatio=="NA"
destring NDC_updated_increased_informatio, replace

local control "c.GDP_ppp_2015_log##c.vulnerability_2015##c.coal_rents_2015##c.oil_rents_2015##c.natural_gas_rents_2015##c.v2x_mpi_2015"
dsregress NDC_updated_increased_ambition NDC_updated_increased_informatio, vce(robust) /// 
controls(`control') selection(cv) rseed(46503448)
eststo n45

esttab  n45  using TableC9.tex, noconstant se  label star( * 0.10 ** 0.05 *** 0.010) ///
title("Correlation between increased ambition and increased information in the updated NDCs") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace


*********** Regressions from the text, with full list of controls. *****************
***** Table H.1: Reproduction of Table 1, displaying all control variables ****** 
//Unweighted
local control "GDP_ppp_2015_log v2x_mpi_2015 vulnerability_2015 coal_rents_2015 oil_rents_2015 natural_gas_rents_2015"
reg Dupont_ambition_low index_2 `control',r
estimates store t1

//regression weights
reg Dupont_ambition_low indexreg `control',r
estimates store t2

//PCA weights
reg Dupont_ambition_low f1 `control',r
estimates store t3

//double lassos
//unweighted
reg Dupont_ambition_low index_2 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015#c.coal_rents_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.v2x_mpi_2015#c.vulnerability_2015#c.coal_rents_2015#c.natural_gas_rents_2015 natural_gas_rents_2015 vulnerability_2015, r
estimates store t4

//regression weights
reg Dupont_ambition_low indexreg GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 natural_gas_rents_2015 vulnerability_2015, r
estimates store t5

//PCA weights
reg Dupont_ambition_low f1 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015 c.GDP_ppp_2015_log#c.v2x_mpi_2015#c.oil_rents_2015#c.natural_gas_rents_2015  c.GDP_ppp_2015_log#c.vulnerability_2015 c.vulnerability_2015#c.coal_rents_2015#c.oil_rents_2015 vulnerability_2015,r
estimates store t6


esttab  t1 t4 t2 t5 t3 t6  using TableH1.tex, noconstant r2 star( * 0.10 ** 0.05 *** 0.010) se  label  ///
title("Reproduction of Table 1, displaying all control variables") ///
 nodepvars nomtitles    ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace


********** Table H.2: Reproduction of Table 2, displayng all control variables *******
//No weights
reg Dupont_ambition_low index_2  v2x_mpi_2015 transamb GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.vulnerability_2015#c.coal_rents_2015#c.natural_gas_rents_2015 natural_gas_rents_2015 vulnerability_2015, r
estimates store t7

//regression weights
reg Dupont_ambition_low indexreg v2x_mpi_2015 transamb1 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.vulnerability_2015#c.coal_rents_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.vulnerability_2015#c.natural_gas_rents_2015 natural_gas_rents_2015 vulnerability_2015, r
estimates store t8

//pca weights
reg Dupont_ambition_low f1 v2x_mpi_2015 transamb2 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.GDP_ppp_2015_log#c.vulnerability_2015#c.oil_rents_2015 c.vulnerability_2015#c.coal_rents_2015#c.oil_rents_2015 vulnerability_2015, r
estimates store t9

esttab  t7 t8 t9  using TableH2.tex, noconstant se r2 label star( * 0.10 ** 0.05 *** 0.010) ///
title("Reproduction of Table 2, displaying all control variables") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace



****** Table H.3: Reproduction of Table C.2, displaying all control variables ******  
//standardized index
reg Dupont_ambition_low index_z v2x_mpi_2015 transamb3 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.coal_rents_2015#c.natural_gas_rents_2015 c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.vulnerability_2015#c.coal_rents_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.vulnerability_2015#c.natural_gas_rents_2015 natural_gas_rents_2015 vulnerability_2015, r
estimates store t10


//type of target
reg Dupont_ambition_low type_target v2x_mpi_2015 transamb4 GDP_ppp_2015_log c.GDP_ppp_2015_log#c.coal_rents_2015 c.GDP_ppp_2015_log#c.oil_rents_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.coal_rents_2015#c.oil_rents_2015#c.natural_gas_rents_2015 c.vulnerability_2015#c.coal_rents_2015 c.vulnerability_2015#c.coal_rents_2015#c.natural_gas_rents_2015 c.vulnerability_2015#c.coal_rents_2015#c.oil_rents_2015 c.vulnerability_2015#c.natural_gas_rents_2015 c.vulnerability_2015#c.oil_rents_2015#c.natural_gas_rents_2015 natural_gas_rents_2015 vulnerability_2015, r 
estimates store t11

esttab  t10 t11  using TableH3.tex, noconstant se r2 label star( * 0.10 ** 0.05 *** 0.010) ///
title("Reproduction of Table C.2, displaying all control variables") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC Ambition)) replace


****** Table H8: Reproduction of Table C9, displaying all control variables ****
reg NDC_updated_increased_ambition NDC_updated_increased_informatio c.GDP_ppp_2015_log#c.v2x_mpi_2015 c.GDP_ppp_2015_log#c.vulnerability_2015 c.vulnerability_2015#c.natural_gas_rents_2015 if vulnerability_2015!=. &  coal_rents_2015!=. & oil_rents_2015!=. & natural_gas_rents_2015!=. & v2x_mpi_2015!=. , r
estimates store t12

esttab  t12 using TableH8.tex, noconstant se r2 label star( * 0.10 ** 0.05 *** 0.010) ///
title("Reproduction of Table C.9, displaying all control variables") ///
 nodepvars nomtitles  ///
gap eqlabels(none) collabels(,lhs(Dep Var: NDC increased ambition)) replace




//Run further robustness
cd "$path"
run 2_Further_robustness.do










